Preserving doc "Date Created" as displayed in Windows explorer

Hello.  We've just retired an SBS and have about 2000 Word docs that have their attached templates linked to the obsolete server.  Using EditAttachedTemplates (vb.net) solves the missing template problem but introduces another.  It wipes the Date Created - for Windows explorer purposes.

Our staff accesses all of the .docm's by windows explorer (sorted by "Date Created").  Without the template repair app, each doc takes 30 seconds to open and machines are searching for the old server.

I do not have access to the source code of the template repair app.  Also... I am not a dev and we do not employ one.  So... hypothetically, if I could find someone to alter the vb repair app, could it in theory be adjusted so that the original "Date Created" as displayed in W7 explorer would be unchanged?


January 29th, 2015 8:28am

To update templates and retain the original file date/time stamps, see, for example, the code I posted at: http://www.eileenslounge.com/viewtopic.php?f=26&t=14499#p107602
Free Windows Admin Tool Kit Click here and download it now
January 29th, 2015 9:21am

Thank you, Paul.

This code has following issues:

1. Its "Last Modified" date retention line returns an error. "Object does not support this action". I worked it around using the Shell method though.

UpdateModDT xFolder, xFile, xDT

Function UpdateModDT(myFolder, myFile, DateTime)
    
    Dim objShell, objFolder
    
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.NameSpace(CStr(myFolder))
    objFolder.Items.Item(myFile).ModifyDate = DateTime

End Function

2. It skips the Protected files and returns an error when it cannot write the reason in the the document from where it was run

3. It only works on one extension type at a time, i.e. currently set for *.doc

Can you please assist on this?

Thanks,

Josh

February 1st, 2015 10:38pm

Re: 1 - I don't know why you would have encountered and error there - the code works fine in my testing.

Re: 2 - The thread in the link contains code in a subsequent post for handling protected files.

Re: 3 - The "*.doc" spec actually allows the code to process .doc, .docx and .docm files, so you shouldn't need to change anything there.

Free Windows Admin Tool Kit Click here and download it now
February 1st, 2015 11:58pm

Thank you, Paul. I'll check for #2, and #3.

For #1, I have added the screenshot in below URL. The error is "Wrong number of arguments or invalid property assignment", I think it clearly means that this is not how we can change this property.

http://s22.postimg.org/pisbdnm41/Wrong_number_of_arguments_or_invalid_property_as.png

Thanks,

Josh

February 2nd, 2015 1:14am

As you say, you have made 'many mods'. I am not in a position to spend time reviewing your code to work out which of your many apparently unnecessary changes is causing problems.
Free Windows Admin Tool Kit Click here and download it now
February 2nd, 2015 6:56pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics